# -*- coding:utf-8 -*-

# 监听端口号
SERVER_PORT             = 8002

# 日志存储位置
LOG_PATH                = 'logs'

# mongodb config
MONGODB_HOST            = '10.0.1.37'
MONGODB_PORT            = 27018
MONGODB_USERNAME        = 'mongo'
MONGODB_PASSWORD        = 'idealsee2012'
DB_NAME                 = 'fota'            # 数据库名
COLLECTION_DATAS        = 'datas'           # 数据类collection，存储zip源描述数据
COLLECTION_DELETE       = 'datas_delete'    # 被删除之后的数据保留库
COLLECTION_SN_ID        = 'sn_id'           # 测试使用的sn_id

# 数据库集合
COLL_REC                = 'record'          # 其他记录

COLL_USER               = 'user'            # 用户数据
COLL_SEED               = 'seed'            # 测试包数据
COLL_CLASS              = 'class'           # 测试类
COLL_CLASSDV            = 'classdv'         # 测试类－子设备

COLL_CLASSPUSH          = 'classpush'       # 测试类－推送
COLL_CLASSRES           = 'classres'        # 测试类－结果
COLL_CLASSLOG           = 'classlog'        # 测试类－推送记录

COLL_CHANNEL            = 'channel'         # 正式环境 - 渠道
COLL_CHANNELPUB         = 'channelpub'      # 正式环境 - 渠道发布
COLL_CHANNELLOG         = 'channellog'      # 正式环境 - 渠道发布操作记录
COLL_CHANNELRES         = 'channelres'      # 正式环境 - 渠道测试结果记录

# cookie
COOKIE_KEY              = 'fota-admin'
COOKIE_VALUE            = 'idealsee-fota'

# admin
ADMIN_USER              = 'idealsee'
ADMIN_PASS              = 'idealsee2012'

# JWT
JWT_SECRET    = '55c808909dd4e45ed22382ba'
JWT_ALGORITHM = 'HS256'
JWT_EXP       = 86400      # 默认登录过期时间　一天
JWT_OPTIONS   = {
   'verify_signature': True,
   'verify_exp' : True,
   'verify_nbf' : False,
   'verify_iat' : False,
   'verify_aud' : False,
   'require_exp': False,
   'require_iat': False,
   'require_nbf': False
}

AUTHCODE  = '55c808909tigered22388bbb'

# Switch
TOKEN_AUTH_SWITCH = True

# file
SITE_URL = "localhost"
FULL_SITE_URL = "http://" + SITE_URL
MEDIA_BASE_URL = "http://" + SITE_URL
FILE_CDN_URL   = "http://file.idealens.com"
UPLOAD_FILE_TO_QINIU = True




